package com.arges.web.common;

/**
 * 静态常量实体类
 * 
 * @author arges
 */
public class Constant
{

	public static final String CLIENT_NAME = "graduation_project";

	public static final String SORTORDER = "asc";

	public static final String ISSORTORDER = "desc";

	public static final String DRIVER_USERNAME = "driver_username";

	public static final String DRIVER_PASSWORD = "driver_password";

	public static final String SYSTEM_WEB_PATH = "/WEB-INF/classes/";

	public static final String CONFIGUR_PROPERTIES = SYSTEM_WEB_PATH + "configur.properties";

	public static final String INTERFACE_PROPERTIES = SYSTEM_WEB_PATH + "interface.properties";

	public static final String I18N_PROPERTIES = SYSTEM_WEB_PATH + "messageResource";

	public static final String RTSP_URL_IP = "system.rtsp.ip";

	public static final String CSS_WEB_ALARM_NAME = "systemConfig.css.alarmPlanName";

	public static final String BAYONET_WEBSERVICES = "systemConfig.css.bayonetWebservice";

	public static final String VEDIO_CONFERENCE_WEBSERVICES = "system.vedio.conference.webservice";

	public static final String SYSTEM_MEDIA_PLAY = "system.media.play.url";

	public static final String SYSTEM_TOKEN_MEDIA_PLAY = "system.media.token.url";

	public static final String CSS_MEDIA_port = "9554";

	public static final String CSS_WEB_PORT = "80";

	/**
	 * 是否挂载用户
	 */
	public static String HAS_USER = "HAS_USER";

	/**
	 * 验证成功
	 */
	public static String SUCCESS = "SUCCESS";

	/**
	 * 失败
	 */
	public static String ERROR = "ERROR";

	/**
	 * 警告
	 */
	public static String WARNN = "WARNN";

	public static final String JDBC_DRIVER = "jdbc.driverClass";

	public static final String JDBC_URL = "jdbc.url";

	public static final String JDBC_USER = "jdbc.user";

	public static final String JDBC_PASS = "jdbc.password";

	public static final String SUPPORT_TEST_DATA = "support.test.data";

	public static final String IGNORE_PROJECT_TYPE = "ignore.project.type";

	public static final String DEBUG = "debug";

	public static final String ITC_WSDL = "itc.wsdl";

	/** 编码 */
	public static String ENCODING = "UTF-8";

	/** 系统用户名称，该用户不可被删除，拥有所有权限 */
	public static String SYSTEM_USER_NAME = "system";

	/**
	 * 发送心跳包时间间隔，单位毫秒
	 */
	public static int SENT_HEARTBEAT_TIME = 30000;

	/**
	 * 检查某个主机是否可达的时长，单位毫秒
	 */
	public static int HOST_REACHABLE_TIME = 5000;

	/**
	 * 数据库中表示true的值
	 */
	public static int DB_TRUE = 1;

	/**
	 * 数据库中表示false的值
	 */
	public static int DB_FALSE = 0;

	/** 离线状态 **/
	public static int DB_UNONLINE = 2;

	/* 正则表达式, IPv4 */
	private static final String REGULAR_EXPRESSION_IPv4 = "^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}$";

	/* 正则表达式, IPv6 */
	// private static final String REGULAR_EXPRESSION_IPv6 =
	// "^\\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*(\\/(\\d)+)?$";

	/** 正则表达式, IP, 改该正则表达式需要另外再改一个地方，即validation.js，修改完后页面将不允许添加不符合该表达式的IP的设备 */
	public static final String REGULAR_EXPRESSION_IP = REGULAR_EXPRESSION_IPv4;// + "|(" + REGULAR_EXPRESSION_IPv6 +
																				// ")";

	/** 正则表达式, 不受协议支持的字符集 */
	public static final String REGULAR_EXPRESSION_INVALID_CHAR = "[^\\u4E00-\\u9FA5a-zA-Z0-9\\w\\-\\(\\).（）;#]*";

	/** 正则表达式, 不受协议支持的字符集, 支持尖括号和 斜杠 / */
	public static final String REGULAR_EXPRESSION_INVALID_CHAR_IGNORE_TAG = "[^\\u4E00-\\u9FA5a-zA-Z0-9\\w\\-\\(\\).（）;#<>\\/]*";

	/** session中的用户 */
	public static final String SESSION_TYPE_USER = "user";

	/** 验证出错 */
	public static final String VALIDATION_ERROR = "validationError";

	/** 菜单根节点ID */
	public static final String MENU_ROOT_ID = "menuRoot";

	/** 管理端菜单根节点 */
	public static final String MENU_ADMINISTER_ID = "administerRoot";

	/** 操作端菜单根节点 */
	public static final String MENU_CLIENT_ID = "clientRoot";

	/** 操作端菜单根节点 */
	public static final String MENU_OPERATION_ID = "operationRoot";

	/** 子系统编码 1-管理端 */
	public static final String SYSTEM_CODE_ADMINISTER = "1";

	/** 子系统编码 2-操作端 */
	public static final String SYSTEM_CODE_OPERATION_WEB = "2";

	/** 子系统编码 3-操作端控件 */
	public static final String SYSTEM_CODE_OPERATION_OCX = "3";

	/** 子系统编码 4-客户端 */
	public static final String SYSTEM_CODE_CLIENT = "4";

	/** 菜单根节点真实编号 */
	public static final Long MENU_ROOT_REALID = -1L;

	/** 根节点 */
	public static final String ROOT = "root";

	/** 状态 */
	public static final String ON = "on";

	public static final String OFF = "off";

	public static final String SAME = "SAME";

	/**
	 * 密码验证
	 */
	public static String PASSWORD_REGEX = "[0-9@A-Za-z_-]+";

	/**
	 * 用户名验证，支持字母，数字，下划线，中文
	 */
	public static String USERNAME_REGEX = "[0-9A-Za-z_\\-\\|\\u4E00-\\u9FFF]+";

	public static String NAME_SPACE = "http://webservice.dhsoft.com";

	public static String TRUE = "true";

}
